package com.heaven.annotation;

@UserAnnotation(id = 100, name = "Jack")
public class AnnotationTest {
    private Object obj;

    public void test(){
        Class<AnnotationTest> clazz = AnnotationTest.class;
        UserAnnotation annotation = clazz.getAnnotation(UserAnnotation.class);
        System.out.println(annotation.age());
        System.out.println(annotation.gender());
        System.out.println(annotation.id());
        System.out.println(annotation.name());

        boolean clzHashAnnotation = clazz.isAnnotationPresent(UserAnnotation.class);
        System.out.println(clzHashAnnotation);
    }
    public static void main(String[]args){
        new AnnotationTest().test();
    }
}
